#include "act.h"
#include "IO.h"
STRACTType g_act_stRegs;
void fnACT_LEDCon(U8 on){
	g_act_stRegs.led = on;
	if(g_act_stRegs.led){
		SET_IO_LOW(ACT_LED_PORT, ACT_LED_PIN);
	}else{
		SET_IO_HIGH(ACT_LED_PORT, ACT_LED_PIN);
	}
}
void fnACT_BEEPCon(U8 on){
	g_act_stRegs.beep = on;
	if(g_act_stRegs.beep){
		SET_IO_HIGH(ACT_BEEP_PORT, ACT_BEEP_PIN);
	}else{
		SET_IO_LOW(ACT_BEEP_PORT, ACT_BEEP_PIN);
	}
}
void fnACT_FANCon(U8 on){
	g_act_stRegs.fan = on;
	if(g_act_stRegs.fan){
		SET_IO_HIGH(ACT_FAN_PORT, ACT_FAN_PIN);
	}else{
		SET_IO_LOW(ACT_FAN_PORT, ACT_FAN_PIN);
	}
}
void fnACT_Init(void){
	SET_IO_LOW(ACT_LED_PORT, ACT_LED_PIN);
	SET_IO_LOW(ACT_BEEP_PORT, ACT_BEEP_PIN);
	SET_IO_LOW(ACT_FAN_PORT, ACT_FAN_PIN);
	memset(&g_act_stRegs, sizeof(g_act_stRegs), 0);
}